package com.example.demo.entity;

import java.util.Date;

import io.swagger.annotations.ApiModel;

@ApiModel
public class User {
  private int id;
  private String name;
  private String password;
  private Date create_time;
  private Date update_time;

  public User() {
  }

  public User(String name, String password, Date time) {
    this.name = name;
    this.password = password;
    this.create_time = time;
    this.update_time = time;
  }

  public User(String name, String password, Date create_time, Date update_time) {
    this.name = name;
    this.password = password;
    this.create_time = create_time;
    this.update_time = update_time;
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public Date getCreate_time() {
    return create_time;
  }

  public void setCreate_time(Date create_time) {
    this.create_time = create_time;
  }

  public Date getUpdate_time() {
    return update_time;
  }

  public void setUpdate_time(Date update_time) {
    this.update_time = update_time;
  }

  @Override
  public String toString() {
    return "User [id=" + id + ", name=" + name + "]";
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + id;
    return result;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    User other = (User) obj;
    if (id != other.id)
      return false;
    return true;
  }

}
